import Mock from "mockjs";


Mock.mock("/api/list",{
    code:200,
    "list|15":[{
        "id":"@id",
        "name":"@cword(2)",
        "content":[{
            "id":"@id",
             "img":"@image(300x100,@color)",
             "info|10":[{
                "id":"@id",
                "img":"@image(100x100,@color)",
                "num":1,
                "count|1-1000":1,
                "price|1-1000":1,
                "title":"@ctitle(5,8)",
                "desc":"@cword(5,7)",
                "flag":false,
                "type|1":["全部","好吃推荐","时令上新","会员专区"]
             }]
        }]
    }]
})

Mock.mock("/api/history",{
    code:200,
    "history|10":[{
        "id":"@id",
        "title":"@ctitle(2)",
    }]
})

Mock.mock("/api/buy",{
    code:200,
    "buy|8":[{
        "id":"@id",
        "title":"@ctitle(14)",
        "price|1-1000":1,
        "count|1-1000":1,
        "img":"@image(100x100,@color)",
    }]
})

Mock.mock("/api/alldata",{
    code:200,
    "alldata|80":[{
        "id":"@id",
        "title":"@ctitle(14)",
        "price|1-1000":1,
        "count|1-1000":1,
        "img":"@image(100x100,@color)",
    }]
})
